local FightInterface = require("gameLogic.fightSkill.sequence.FightInterface")
local FightCallEffect = class("FightCallEffect", FightInterface)
local GameUtils = require("utils.GameUtils")
local FightHelper = require("gameLogic.fight.FightHelper")

function FightCallEffect:ctor(config, actor, manager)
    self._targets = manager
    self._config = config
    FightCallEffect.super.ctor(self)
end

function FightCallEffect:_update()
    if self._sequence then
        return
    end
    self:_effectPlay()
end

-- 技能特效类型 begin
function FightCallEffect:_effectPlay()
end

function FightCallEffect:_playEffect()
    local effectName = self._config.effect
    if effectName == "none" then
        self._isDone = true
        return
    end
    local object = G_ResourceManager:loadEffect(effectName)
    local gameObject = GameUtils.instantiate(object)
    gameObject.transform.position = effectPosition
    local sequence = DOTween.Sequence()
    sequence:AppendInterval(self._config.effect_time)
    sequence:AppendCallback(
        function()
            self._isDone = true
            GameUtils.destroy(gameObject)
        end
    )
    self._sequence = sequence
end

return FightCallEffect
